package com.egene.tw.utils;

import android.text.TextUtils;

/**
 * Created by WZX on 2015/8/28.
 */
public class TitleUtil {
    private static final int TITLE_LENGTH = 5;

    public static String getTitle(String str){
        if(TextUtils.isEmpty(str)){
            return "";
        }else{
            if(str.length() > TITLE_LENGTH){
                return str.substring(0, TITLE_LENGTH) + "...";
            }else{
                return str;
            }
        }
    }
}
